Open
Conversation
Last Conv layer needs to have a stride of 2, just like in the article to keep the down-sampling factor as 2. For the 70x70 PatchGAN, the last conv layer that brings the tensor to an Nx1x1x1 needs a kernel size of 4, a stride of 1 and no padding. With padding, the output tensor is of shape Nx1x3x3 instead of Nx1x1x1 (for a 70x70 input).
Owner
|
I will keep the PatchGAN consistent with the Torch code. But you are free to use other discriminators in your experiments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Last Conv layer needs to have a stride of 2, just like in the article to keep the down-sampling factor as 2.
For the 70x70 PatchGAN, the last conv layer that brings the tensor to an Nx1x1x1 needs a kernel size of 4, a stride of 1 and no padding.
With padding, the output tensor is of shape Nx1x3x3 instead of Nx1x1x1 (for a 70x70 input).
Edit:
After more checks, it turns out that the added correction makes the receptive field of size 64x64 rather than 70x70. It is actually a convolutional implementation of the sliding window with stride 16 (because we have 4 downsamplings of factor 2, 2^4). With an input of size 80x80, the output is of size 2x2 corresponding to the 4 sliding windows with stride 16 each.